<extend name="Index/index" />
<block name="css1">
    <link rel="stylesheet" type="text/css" href="__ROOT__/public/mycss/mycollect.css">
    <script src="__ROOT__/public/js/jquery.min.js"></script>
    <script src="__ROOT__/public/myjs/mycollect.js"></script>
</block>
<block name="main">
<!-- 继承index -->
<div class="placeholder-height"></div>
<div class="container">
        <div class="nrtj-wrap"></div>
        <input class="hide" id="analyzer-server-url" value="">
            
        <div class="wrap-left pull-left" id="log-send-article">
                        <!--文章内容页-->
                <div class="article-left-btn-group">
                    <ul>
                        <li><a><i class="icon icon-article icon-article-wb js-weibo js-share-article" data-location="article" data-f="pc-weibo-article" aid="157471"></i></a>
                        </li>
                        <li class="weixin" data-f="pc-friends-article">
                            <div class="weixin-Qr-code"><img src="__ROOT__/public/imgs/e641a1965de22b43d4ed7aeb48cd42c6_H_5.png"></div>
                            <a><i class="icon icon-article icon-article-pyq" ></i></a>
                        </li>
                        <li><a><i class="icon icon-article icon-article-qzone js-qzone js-share-article" data-location="article" data-f="pc-qzone-article" aid="157471"></i></a></li>
                        <li><a class="js-article-pl-anchor"><i class="icon icon-article icon-article-pl">评论</i></a></li>

                        <!-- 文章收藏 -->
                        <li><a class="js-collection-article"><i  id="collect" class="icon icon-article icon-article-col">收藏</i></a></li>


                    </ul>
                </div>


                <!-- 文章收藏摸态框 -->
                <div class="collect_box" style="display:none;">
                    <div class="size">添加到收藏夹</div>
                    <div class="contain">
                        <!-- <div id="moren"></div> -->
                        
                    </div>
                  <!--   <div class="create"> <span class="glyphicon glyphicon-plus"> 创建收藏夹 </span> </div> -->



                    <input type="hidden" id="art_id" value=" <{$article['aid']}>">
                    <input type="hidden" id="user_id" value="<{$_SESSION['user']['id']}>">
                    <div id="error"></div>
                    <div class="button">
                        <button class="confirm">确定</button>
                        <button class="cancel">取消</button>
                    </div>
                </div>

                <p id="mess" class="mess" style="width:250px;height:50px;background-color:#abcdef; border-radius:10px;float:right;position:fixed; margin-left:900px; bottom:40px;font-size:30px;text-align:center;line-height:50px;display:none;">已收藏</p>

              <!--   <pre>
                <?php var_dump($article)?> -->
        <div class="article-wrap">
                    <h1 class="t-h1"><{$article['title']}></h1>
                    <div class="article-author">
                                        <a href="#" class="column-link" target="_blank"><{$article['cname']}></a>
                                        <span class="author-name">
                                                <a><{$article['name']}></a>
                                            </span>
                        <i class="icon icon-line"></i>

                        <!-- 各种状态 -->
                        <span class="article-time"><{$article['create_time']}></span>
                        <span class="article-share">收藏 <{$article['zan']}></span>
                        <span class="article-pl">评论 <{$article['zan']}></span>
                    </div>

                    <!--管理员按钮-->
                    <div class="article-manage-bar"></div>

                    <!-- 文章开始     -->
                    <if condition="(empty($article))">
                          <H2>没找到你要的文章</H2>
                    <else />
                   <div class="article-img-box">
                        <img src="__ROOT__/Uploads/<{$article['cover']}>" alt="<{$article['title']}>"> <!-- 未图片标题打印 -->
                    </div>
                    <div id="article_content" class="article-content-wrap">
                                       <{:htmlspecialchars_decode(htmlspecialchars_decode($article['content']))}>             
                                <div class="neirong-shouquan">
                                        <span class="c2">*文章作者<{$article['name']}>独立观点，不代表虎嗅网立场<br></span>
                                        <span>本文由 <a href="#" target="_blank"><{$article['name']}></a> 授权 <a
                                    href="/">虎嗅网</a> 发表，并经虎嗅网编辑。转载此文章须经作者同意，并请附上出处(<a href="/">虎嗅网</a>)及本页链接。<br></span>
                                </div>
                                <div class="neirong-shouquan-public">
                                        <span>关注微信公众号虎嗅网，定时推送，福利互动精彩多</span>
                                </div>
                    </div>
                    </if>
                    <!-- 文章结束 -->
            <!-- 点赞 -->
            <div>

                           <div >
                                        <div class="praise-box transition  center-box " onclick="dz(<{$article['aid']}>, this)">
                                          
                                            <i class="icon icon-article-zan"></i><span class="num"   ><{$article['zan']}></span>
                                        </div>
                            </div>

                         <!--    <div >
                                <div class="praise-box-add"><i class="icon icon-article-zan-add"></i><span>+1</span></div>
                             <button class="btn btn-info" ></button>
                            </div> -->
             </div>

<!-- ======================================= -->
             <div class="tag-box ">
                        <ul class="transition">
                                    <a href="<{:U('Article/a')}>" target="_blank"><li class="transition">好莱坞</li></a>
                                    <a href="<{:U('Article/a')}>" target="_blank"><li class="transition">电影</li></a>
                                    <a href="<{:U('Article/a')}>" target="_blank"><li class="transition">投稿</li></a>
                                    <a href="<{:U('Article/a')}>" target="_blank"><li class="transition">电影产业</li></a>
                        </ul>
            </div>
            
                  <div class="feed-box-ad article-box-ad"><script src="__PUBLIC__/Home/js/ds_1.js"></script>
                    <script>
                    (function() {
                        var s = "_" + Math.random().toString(36).slice(2);
                        document.write('<div id="' + s + '"></div>');
                        (window.slotbydup=window.slotbydup || []).push({
                            id: '1134728',
                            container: s,
                            size: '710,80',
                            display: 'inlay-fix'
                        });
                    })();
                    </script>
                    </div>
           
                    <!--公共评论-->
                    <div class="pl-wrap" id="pl-wrap-article" name="pl-wrap-article">
                                <div class="pl-form-wrap">
                              <empty name="comment">
                                         <span class="span-mark-author active">
                                    </span>
                                            <br>
                                            <p></p>
                                             <div class="no-login-box ">
                                                     暂无评论
                                            </div>
                                            <else /> 
                                <volist name="comment" id="vo" >
                                            <span class="span-mark-author active">
                                            <{$vo['name']}>评论</span>
                                            <br>
                                            <p><{:date("Y-m-d H:m:s ",$vo['com_time'])}></p>
                                             <div class="no-login-box ">
                                                     <{$vo['c_content']}>
                                            </div>
                                            <br><br><br>
                                   </volist>
                                   </empty>
                                            <span class="span-mark-author active">发表您的评论</span>
                                            <div class="pl-form-box pl-article-wrap">
                                            <div class="clearfix"></div>
                                            <!-- 判断用户是否登录 -->
                                            <!-- // 输出$_SESSION['user_id']变量 -->

                                                        <empty name="Think.session.user.name">
                                                        <!-- 检查id为空 -->
                                                        <div class="no-login-box ">
                                                               <a href="<{:U('Login/login')}>" class="moder-lgn-box" >登录</a>后参与评论
                                                        </div>
                                                       <else />
                                                        <div class="no-login-box ">
                                                        
                                                        <form action="<{:U('Article/conadd')}>" method="post">
                                                        <textarea class="form-control " id="saytext" name="context" placeholder="客官，8个字起评，不讲价哟">  </textarea>
                                  </div>
                                                     
                                                        <input type="hidden" name="aid" value="<{$article['aid']}>">
                                        
                                                        <button class="btn btn-article moder-lgn-box transition">发表</button>
                                                        </form>
                                                        </empty>

                                            </div>
                                </div>  
                    </div>
                     <!-- 评论结束 -->
        </div>
 </div>
    <div class="wrap-right pull-right">
                <div class="box-author-info">
                              <div class="author-face">
                                      <a href="#" target="_blank">
                                          <img src="__ROOT__/Uploads/<{$article['img_150']}>">
                                      </a>
                               </div>
                              <div class="author-name">
                                  <a href="<{:U('Writercenter/index',array('uid'=>$article['uid']))}>" target="_blank">
                                    <{$article['name']}>      </a>
                                  <a href="#" target="_blank"></a>
                              </div>
                              <div class="author-one">除了发现新闻，还要探索深藏在</div>
                              <div class="author-professional"></div>
                              <div class="author-article-pl">
                                  <ul>
                                      <li><a  target="_blank"><{$ucount}>篇文章</a></li>
                                      <i class="icon icon-line-face"></i>
                                      <li><a  target="_blank"><{$ucon}>个评论</a></li>
                                  </ul>
                              </div>
                </div>

                    <div><script src="__PUBLIC__/Home/js/ds_1.js"></script>
                                <script>
                                (function() {
                                    var s = "_" + Math.random().toString(36).slice(2);
                                    document.write('<div id="' + s + '"></div>');
                                    (window.slotbydup=window.slotbydup || []).push({
                                        id: '1134769',
                                        container: s,
                                        size: '340,274',
                                        display: 'inlay-fix'
                                    });
                                })();
                                </script>
                    </div>
            <div class="placeholder"></div>
            <div class="box-moder hot-tag">
                        <h3><b>热门标签</b></h3>
                        <span class="pull-right project-more"><a href="#" class="transition" target="_blank">全部</a></span>
                        <span class="span-mark"></span>
                        <div class="search-history search-hot">
                            <ul>
                                    <li class="transition"><a href="#" target="_blank">阿里巴巴</a></li>
                                    <li class="transition"><a href="#" target="_blank">投稿</a></li>
                                    <li class="transition"><a href="#" target="_blank">创业</a></li>
                                    <li class="transition"><a href="#" target="_blank">头条</a></li>
                                    <li class="transition"><a href="#" target="_blank">马云</a></li>
                                    <li class="transition"><a href="#" target="_blank">大数据</a></li>
                                    <li class="transition"><a href="#" target="_blank">移动互联网</a></li>
                                    <li class="transition"><a href="#" target="_blank">电子商务</a></li>
                                    <li class="transition"><a href="#" target="_blank">微信</a></li>
                                    <li class="transition"><a href="#" target="_blank">Facebook</a></li>
                            </ul>
                        </div>
            </div>
<!-- ============================================= -->
<!-- 下步热评 -->
                    <div class="placeholder"></div>
                    <!-- 热文 -->
                    <div class="wrap-right pull-right">
                        <div class="box-moder hot-article">
                            <h3><b>热文</b></h3>
                            <span class="span-mark"></span>
                            <ul>
                                <volist name="hot" id="val">
                                <li>
                                    <div class="hot-article-img">
                                        <a href="<{:U('Article/index', array('aid'=>$val['aid']))}>" target="_blank">
                                            <img src="__ROOT__/Uploads/<{$val['img']}>">
                                        </a>
                                    </div>
                                    <a href="<{:U('Article/index', array('aid'=>$val['aid']))}>" class="transition" target="_blank"><{$val['title']}></a>
                                </li>
                                </volist>
                            </ul>
                        </div>
                    </div>
                    <!-- 热文结束 -->
                    <input type="hidden" id="us_id"  name="id" value="<{$Think.session.user.id}>">
          </div>
</div>
<script type="text/javascript"></script>
<script type="text/javascript">
    var url ="<{:U('Mycollect/getCategory')}>";
    var save_url = "<{:U('Mycollect/saveArticle')}>";
</script>
</block>
<block name="js">
                <script >
                                    var m= 0;
                                    // console.log(url);
                                      
                                            function dz(id, obj){
                                              console.log($('#us_id').val());
                                              if ($('#us_id').val()=='') {
                                                  alert('请登录后再点赞');
                                              } else{
                                                  
                                                    $.ajax({
                                                         type: "GET",
                                                         url: '<{:U('Article/zan1')}>',
                                                         data: "aid="+id,
                                                         success: function(data){
                                                          if (data!=null) {
                                                            $(obj).children().last().html(data);
                                                          };
                                                          alert('请不要重复点赞!');
                                                         }
                                                      });
                                                    }
                                                
                                            }
                    
                                </script>
</block>

